-
Notifications
You must be signed in to change notification settings - Fork 486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add code to check for staleness in labelstore #5970
Conversation
totalIDs *prometheus.Desc | ||
idsInRemoteWrapping *prometheus.Desc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could these be constants in the package?
// Run starts a Service. Run must block until the provided | ||
// context is canceled. Returning an error should be treated | ||
// as a fatal error for the Service. | ||
func (s *service) Run(ctx context.Context, host agent_service.Host) error { | ||
<-ctx.Done() | ||
return nil | ||
staleCheck := time.NewTicker(10 * time.Minute) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably don't need to do this now, but do you think there may be a need to configure this in the future?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since staleness markers arent configurable and this was meant to be double the staleness marker length I dont think it will need to be configurable. Though that is famous last words.
* Add code to check for staleness which touched a ton of tests since I also added metrics. * Update metric * Add explicit _ for register * pr feedback on changing to gauges * updated comment with test results
PR Description
This wires up the staleness check from the labelstore that will ideally reduce memory usage in high cardinality or high churn environments.
Which issue(s) this PR fixes
Closes #5585
Notes to the Reviewer
PR Checklist